package cc.jq1024.infrastructure.persistent.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.*;

/**
 * <p>
 * 用户中奖记录表
 * </p>
 *
 * @author lijiaqiang@ljq1024.cc
 * @since 2024-04-28
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("user_award_record")
public class UserAwardRecordPO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 活动ID
     */
    @TableField("activity_id")
    private Long activityId;

    /**
     * 抽奖策略ID
     */
    @TableField("strategy_id")
    private Long strategyId;

    /**
     * 抽奖订单ID【作为幂等使用】
     */
    @TableField("order_id")
    private String orderId;

    /**
     * 奖品ID
     */
    @TableField("award_id")
    private Long awardId;

    /**
     * 奖品标题（名称）
     */
    @TableField("award_title")
    private String awardTitle;

    /**
     * 中奖时间
     */
    @TableField("award_time")
    private Date awardTime;

    /**
     * 奖品状态；create-创建、completed-发奖完成
     */
    @TableField("award_state")
    private String awardState;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;


}
